<!--
  ~ MIT License
  ~
  ~ Copyright (c) 2021-2022 yangrunkang
  ~
  ~ Author: yangrunkang
  ~ Email: yangrunkang53@gmail.com
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  -->

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="index">
<!--css-->
<link th:fragment="css" type="text/css" rel="stylesheet" th:href="${ossStatic} + @{/css/view/index.css}"/>
<!--脚本-->
<script async="async" th:fragment="js" type="text/javascript" th:src="${ossStatic} + @{/js/view/index.js}"></script>
<div th:fragment="content">
    <div class="container">
        <div class="row g-2">
            <div class="col-lg-9 mb-2">
                <div class="card card-body shadow-sm border-bottom border-2 border-top-0 border-start border-end-0 p-2">
                    <div class="lead border-bottom">浏览记录</div>
                    <div th:if="${#lists.isEmpty(listViewHistoryDto.viewHistoryList)}" th:include="fragments/index::empty_content"></div>

                    <ul class="mt-2 list-group list-group-flush"
                        th:if="!${#lists.isEmpty(listViewHistoryDto.viewHistoryList)}">
                        <li class="list-group-item p-1" th:each="view,ite : ${listViewHistoryDto.viewHistoryList}">
                            <div class="d-flex align-items-center">
                                <div class="flex-grow-1">
                                    <p class="font-weight-bold mb-1">
                                        <a th:href="${view.url}" class="cv-link"
                                           th:title="${view?.title}"><span th:text="${view?.title}">标题</span></a>
                                        <span class="badge bg-gradient bg-light text-dark float-end" th:text="${view.source}"></span>
                                    </p>
                                    <div class="mb-0 text-black-50 small">
                                        <span th:text="${view.createDate}"></span>
                                    </div>
                                </div>
                            </div>
                        </li>
                    </ul>
                    <div>
                        <div class="mt-2 float-end"
                             th:if="!${#strings.isEmpty(listViewHistoryDto.paginationHtml)}"
                             th:utext="${listViewHistoryDto.paginationHtml}"></div>
                    </div>
                </div>
            </div>
            <div class="col-lg-3">
                <div class="card card-body shadow-sm border-bottom border-2 border-top-0 border-start border-end-0 p-2">
                    <div class="text-black-50"><span th:include="fragments/icon::view_record"></span>浏览记录</div>
                </div>
                <div th:replace="fragments/index::user_manage_fragment(true)"></div>
                <div class="mt-2" th:include="fragments/index::google_right_ad"></div>
            </div>
        </div>
    </div>
</div>
</html>
